package utils.http.builder
{
	import utils.http.HttpConnector;

	public class HttpConnectorBuilder extends HttpConnector
	{
		public function HttpConnectorBuilder(url:String)
		{
			this.url = url;
			super();
		}
		
		public function methodGet():HttpConnectorBuilder {
			this.method = "GET";
			return this;
		}
		
		public function methodPost(content:String):HttpConnectorBuilder {
			this.method = "POST";
			this.content = content;
			return this;
		}
		
		public function secure(isSecure:Boolean):HttpConnectorBuilder {
			if (isSecure == null) {
				this.sendToken = true;
			} else {
				this.sendToken = isSecure;
			}
			return this;
		}
		
		public function saveToken(willVerifyToken:Boolean):HttpConnectorBuilder {
			if (willVerifyToken == null) {
				this.verifyToken = true;
			} else {
				this.verifyToken = willVerifyToken;
			}
			return this;
		}
		
	}
}